//数据库相关请求
import request from "../utils/http.ts"
//1.连接数据库
export const connectDBAPI = (data: any) => {
    return request({
        url: 'db/connect',
        method: 'post',
        data: {
            username: data.username,
            password: data.password,
            url: "jdbc:mysql://localhost:3306/"+data.mysqlName+"?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai"
        }
    })
}
//2.获取数据库列表
export const getDBListAPI = (data: any) => {
    return request({
        url: 'db/getDBList',
        method: 'post',
        data: {
            packageName: data.packageName
        }
    })
}
